<template>
	<view class="contont" style="background-color: #f5f5f5;">
		<view class="way">
			<view style="display: flex;align-items: center;justify-content: space-between;flex-direction: column; width: 100%;margin-top: 8px;">
				<view style="display: flex;align-items: center;width: 100%;margin-bottom: 8px;font-size: 15px;">
					<image src="../../static/img/icon_dd@2x.png" mode="" style="width: 29px;height: 29px;margin-left: 5px;"></image>
				<text>订单编号：{{list.orderCode}}</text>
				</view>
				<image src="../../static/img/line_xuxian%20copy%206@2x.png" style="width: 100%;height: 1px;" mode=""></image>
			</view>
			<view style="font-size: 24rpx; color: #777777;margin-top: 10px;">
				<text style="margin-left: 15px;" >运单客户：{{list.sendPerson}}
				<text v-if="list.sourc!=null">{{list.source}}</text>
				</text>
				<view class="cent" style="margin-top: 10px;">
					<text style="margin-left: 30rpx;">联系人：{{list.esusername}}</text>
					<text style="margin-right: 15px;">电话：{{list.sendTel}}</text>
				</view>
			</view>
		</view>
		<view class="ways">
			<view style="display: flex;align-items: center;justify-content: space-between;flex-direction: column; width: 100%;margin-top: 8px;">
				<view style="display: flex;align-items: center;width: 100%;margin-bottom: 8px;">
				<text  style="font-size: 15px;margin-left: 15px;">运输信息</text>
				</view>
				<image src="../../static/img/line_xuxian%20copy%206@2x.png" style="width: 100%;height: 1px;" mode=""></image>
			</view>
			<view style="font-size: 12px; color: #777777;">
				<view style="margin-top: 15px;margin-left: 15px;">装货方：{{list.startstationname}}</view>
				<view style="margin-top: 10px;margin-left: 15px;">卸货方：{{list.endstationname}}</view>
				<view style="margin-top: 10px;margin-left: 15px;">货物信息：{{list.unitPrice}}元/{{add[0].weightName}}，
				<text >{{add[0].piece}}{{add[0].weightName}}</text>
				<text v-if="add[0].typeName!='请选择货物类型'"> ，{{add[0].name}}</text>
				</view>
				<!-- <view style="margin-top: 10px;margin-left: 15px;">用车要求：平板车，9.6米</view> -->
				<view style="margin-top: 10px;margin-left: 15px;margin-bottom: 10px;">其他要求：尽快送达</view>
				<image src="../../static/img/line_xuxian%20copy%206@2x.png" style="width: 100%;height: 1px;" mode=""></image>
			</view>
			<view style="display: flex;align-items: center;justify-content: space-between;flex-direction: column; width: 100%;margin-top: 8px;">
				<view style="display: flex;align-items: center;width: 100%;margin-bottom: 8px;">
				<text  style="font-size: 15px;margin-left: 15px;">交易信息</text>
				</view>
				<image src="../../static/img/line_xuxian%20copy%206@2x.png" style="width: 100%;height: 1px;" mode=""></image>
			</view>
				<view style="width: 100%;margin-top: 10px;font-size: 12px;color: #777777;" class="cent">
					<text style="margin-left: 15px;">线上支付运费：</text>
					<text style="margin-right: 15px;">{{list.esfee}}</text>
				</view>
				<view style="width: 100%;margin-top: 10px;font-size: 12px;color: #777777;" class="cent">
					<text style="margin-left: 15px;">总运费：</text>
					<text style="margin-right: 15px;color: #FF0700;font-size: 16px;">{{list.esfee}}</text>
				</view>
		</view>
	</view>
</template>
<script>
	import {ajaxs} from '../../apis.js'
	export default {
		data() {
			return{
				list:[],
				add:[]
			}
		},
		onLoad(option) {
			uni.showLoading({
			    title: '加载中！'
			});
			var that=this
			ajaxs({
				url:"/v1/appdriver/driverOrderInfo",
				method:"post",
				data:{
					id:option.id,
					type:option.type
				},
				success(res){
					console.log(res)
					uni.hideLoading()
					that.list=res.data.message.order
				 that.add=that.add.concat(JSON.parse(res.data.message.oldorder.goodsjson))
				}
			})
		},
		filters:{
					 addZero(data){
						 return data.toFixed(2)
					 }
		},
		methods:{
			
		}
	}
</script>
<style>
	page{
		height: 100%;
	}
	.way{
		width:355px;
		height:110px;
		background:rgba(255,255,255,1);
		border-radius:8px;
		margin-top: 10px;
	}
	.ways{
		width:355px;
		height:302px;
		background:rgba(255,255,255,1);
		border-radius:8px;
		margin-top: 10px;
	}
</style>